package com.hfzy.ihk.common.facade.enums;

import com.hfzy.ihk.common.facade.CustomEnumType;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by Administrator on 2018/7/19.
 * 客户意向等级
 * @author wws
 */
public enum CustomerNeedLevel implements CustomEnumType {

    A("a", "较强"),
    B("b", "一般"),
    C("c", "很少"),
    D("d", "需筛选"),
    E("e", "再跟进"),
    F("f", "无需跟进");

    private CustomerNeedLevel(String value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    private String value;

    private String desc;

    public String getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    private static Map<String, CustomerNeedLevel> map = new HashMap<>();
    static {
        for (CustomerNeedLevel value : CustomerNeedLevel.values()) {
            map.put(value.getValue(), value);
        }
    }

    public static CustomerNeedLevel fromValue(String value) {
        CustomerNeedLevel ret = map.get(value);
        if (ret != null) {
            return ret;
        } else {
            throw new IllegalArgumentException("No enum const " + CustomerNeedLevel.class + "." + value);
        }
    }

}
